# protocol_path="项目protocol路径"

protocol_path=$(dirname "$0")
name=$1
if [ -z "$name" ]; then
	printf "生成所有文件"
    protoc -I="$protocol_path"/proto/ --java_out="$protocol_path"/src/main/java "$protocol_path"/proto/*.proto
    sh transfer.sh
else
	printf "生成文件: %s\n" $name
    protoc -I="$protocol_path"/proto/ --java_out="$protocol_path"/src/main/java "$protocol_path"/proto/${name}
    sh transfer.sh ${name}
fi                                   

#mvn clean install